package abstractfactory;

/**
 * @author gaopeng
 * @date 2019/12/8 11:39 上午
 */
public class HumanFactory {

    public static <T extends IHuman> T createHuman(Class<T> tClass){
        try {
            return tClass.newInstance();
        } catch (InstantiationException | IllegalAccessException e) {
            e.printStackTrace();
        }
        return null;
    }
}
